home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / MW MPW Binaries 1.1.1a2 / mwcPPC / MWCIncludes / CommResources.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-31  |  3.5 KB  |  106 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        CommResources.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __COMMRESOURCES__
  13. #define __COMMRESOURCES__
  14.  
  15. #ifndef __OSUTILS__
  16. #include <OSUtils.h>
  17. /*    #include <Types.h>                                            */
  18. /*        #include <ConditionalMacros.h>                            */
  19. /*        #include <MixedMode.h>                                    */
  20. /*            #include <Traps.h>                                    */
  21. #endif
  22.  
  23.  
  24. /*    tool classes (also the tool file types)    */
  25.  
  26. #define classCM 'cbnd'
  27.  
  28. #define classFT 'fbnd'
  29.  
  30. #define classTM 'tbnd'
  31.  
  32. enum  {
  33. /*    version of the Comm Resource Manager    */
  34.     curCRMVersion                = 2,
  35. /* constants general to the use of the Communications Resource Manager */
  36.     crmType                        = 9,                            /* queue type    */
  37.     crmRecVersion                = 1,                            /* version of queue structure */
  38. /*    error codes */
  39.     crmGenericError                = -1,
  40.     crmNoErr                    = 0
  41. };
  42.  
  43.  
  44. /* data structures general to the use of the Communications Resource Manager */
  45.  
  46. typedef OSErr CRMErr;
  47.  
  48. #if defined(powerc) || defined (__powerc)
  49. #pragma options align=mac68k
  50. #endif
  51. struct CRMRec {
  52.     QElemPtr                    qLink;                            /*reserved*/
  53.     short                        qType;                            /*queue type -- ORD(crmType) = 9*/
  54.     short                        crmVersion;                        /*version of queue element data structure*/
  55.     long                        crmPrivate;                        /*reserved*/
  56.     short                        crmReserved;                    /*reserved*/
  57.     long                        crmDeviceType;                    /*type of device, assigned by DTS*/
  58.     long                        crmDeviceID;                    /*device ID; assigned when CRMInstall is called*/
  59.     long                        crmAttributes;                    /*pointer to attribute block*/
  60.     long                        crmStatus;                        /*status variable - device specific*/
  61.     long                        crmRefCon;                        /*for device private use*/
  62. };
  63. #if defined(powerc) || defined(__powerc)
  64. #pragma options align=reset
  65. #endif
  66.  
  67. typedef struct CRMRec CRMRec;
  68.  
  69. typedef CRMRec *CRMRecPtr;
  70.  
  71. #ifdef __cplusplus
  72. extern "C" {
  73. #endif
  74.  
  75. extern pascal CRMErr InitCRM(void);
  76. extern pascal QHdrPtr CRMGetHeader(void);
  77. extern pascal void CRMInstall(CRMRecPtr crmReqPtr);
  78. extern pascal OSErr CRMRemove(CRMRecPtr crmReqPtr);
  79. extern pascal CRMRecPtr CRMSearch(CRMRecPtr crmReqPtr);
  80. extern pascal short CRMGetCRMVersion(void);
  81. extern pascal Handle CRMGetResource(ResType theType, short theID);
  82. extern pascal Handle CRMGet1Resource(ResType theType, short theID);
  83. extern pascal Handle CRMGetIndResource(ResType theType, short index);
  84. extern pascal Handle CRMGet1IndResource(ResType theType, short index);
  85. extern pascal Handle CRMGetNamedResource(ResType theType, ConstStr255Param name);
  86. extern pascal Handle CRMGet1NamedResource(ResType theType, ConstStr255Param name);
  87. extern pascal void CRMReleaseResource(Handle theHandle);
  88. extern pascal Handle CRMGetToolResource(short procID, ResType theType, short theID);
  89. extern pascal Handle CRMGetToolNamedResource(short procID, ResType theType, ConstStr255Param name);
  90. extern pascal void CRMReleaseToolResource(short procID, Handle theHandle);
  91. extern pascal long CRMGetIndex(Handle theHandle);
  92. extern pascal short CRMLocalToRealID(ResType bundleType, short toolID, ResType theType, short localID);
  93. extern pascal short CRMRealToLocalID(ResType bundleType, short toolID, ResType theType, short realID);
  94. extern pascal OSErr CRMGetIndToolName(OSType bundleType, short index, Str255 toolName);
  95. extern pascal OSErr CRMFindCommunications(short *vRefNum, long *dirID);
  96. extern pascal Boolean CRMIsDriverOpen(ConstStr255Param driverName);
  97. extern pascal CRMErr CRMParseCAPSResource(Handle theHandle, ResType selector, unsigned long *value);
  98. extern pascal OSErr CRMReserveRF(short refNum);
  99. extern pascal OSErr CRMReleaseRF(short refNum);
  100. #ifdef __cplusplus
  101. }
  102. #endif
  103.  
  104. #endif
  105.  
  106.